<?php

namespace app\admin\validate;

use think\Validate;

class AuthGroup extends Validate {

    /**
     * 规则定义
     * @var array
     */
    protected $rule = [
        'name'        => 'require|min:2|max:10',
        'description' => 'require|min:2|max:20'
    ];

    /**
     * 提示信息定义
     * @var array
     */
    protected $message = [
        'name'        => '请输入2-10位角色名称',
        'description' => '请输入2-20位角色描述',
    ];

    /**
     * 场景定义
     * @var array
     */
    public $scene = [
        'operateAjax' => ['name', 'description'],
    ];
}